import request from '@/utils/request';
//获取管网资产列表
export function getEquipStatistics(data) {
    return request({
        url: `getinfo/asset-overview/statistics`,
        method: 'get',
        data: data
    })
}
//获取管网资产列表
export function getTemplateParam(data) {
    return request({
        url: `getinfo/feature-template/returnFeatureTemplateParam`,
        method: 'post',
        data: data
    })
}
export function getQueryTemplate(data) {
    return request({
        url: `getinfo/spatial-query-template/list`,
        method: 'get',
        data: data
    })
}

export function insertQueryTemplate(data) {
    return request({
        url: `getinfo/spatial-query-template/insert`,
        method: 'post',
        data: data
    })
}

export function getConditionQueryList(data) {
    return request({
        url: `getinfo/RunningManage/equipment-query-condition-list`,
        method: 'get',
        data: data
    })
}

export function saveConditonQueryTemplate(data) {
    return request({
        url: `getinfo/condition-query-template/saveTemplate`,
        method: 'post',
        data: data
    })
}
export function saveStatisticTemplate(data) {
    return request({
        url: `getinfo/advance-statistics-template/save`,
        method: 'post',
        data: data
    })
}
export function saveConditonQueryThemicTemplate(data) {
    return request({
        url: `getinfo/feature-template/addFeatureTemplate`,
        method: 'post',
        data: data
    })
}
export function searchConditonQueryTemplate(data) {
    return request({
        url: `getinfo/RunningManage/spatial-query-all-area`,
        method: 'post',
        data: data
    })
}

export function getConditionTemplateList(data) {
    return request({
        url: `getinfo/condition-query-template/listTemplate`,
        method: 'get',
        data: data
    })
}

export function deleteSpatialTemplate(data) {
    return request({
        url: `getinfo/spatial-query-template/delete`,
        method: 'post',
        data: data
    })
}

export function deleteConditionTemplate(data) {
    return request({
        url: `getinfo/condition-query-template/deleteTemplate`,
        method: 'post',
        data: data
    })
}

export function getStasiticResult(data1, data2) {
    return request({
        url: `getinfo/asset-overview/equipmentStatistic?type=${data1}&area=${data2}`,
        method: 'get',
        data: data1,
        data1: data2
    })
}
//模板返回
export function getallListTemplate(data) {
    return request({
        url: `getinfo/condition-query-template/listTemplate`,
        method: 'get',
        data: data,
    })
}
//模板返回
export function getStatisticListTemplate(data) {
    return request({
        url: `getinfo/advance-statistics-template/list`,
        method: 'get',
        data: data,
    })
}
//模板查询
export function getResultByTemplate(data) {
    return request({
        url: `getinfo/condition-query-template/returnResultByTemplate`,
        method: 'get',
        params: data,
    })
}
//模板查询
export function getResultByStatisticTemplate(data) {
    return request({
        url: `getinfo/advance-statistics-template/getById`,
        method: 'get',
        params: data,
    })
}
//汉字查询
export function getChineseByEnglish(data) {
    return request({
        url: `getinfo/asset-overview/getCNItemName`,
        method: 'POST',
        data: data,
    })
}
//属性查询
export function getConditionAttributeList(data) {
    return request({
        url: `getinfo/condition-query-template/getConditionAttributeList`,
        method: 'get',
        params: data,
    })
}
//整表查询 tableName   field
export function getStaticResult(data) {
    return request({
        url: `getinfo/RunningManage/returnStaticResult`,
        method: 'get',
        params: data,
    })
}
//导出Excel表
export function getStaticResultExcel(data) {
    return request({
        url: `getinfo/RunningManage/exportData`,
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
//保存专题图
export function getListFeatureTemplate(data) {
    return request({
        url: `getinfo/feature-template/listFeatureTemplate`,
        method: 'get',
        data: data,
    })
}
//删除专题图
export function deleteFeatureTemplate(data) {
    return request({
        url: `getinfo/feature-template/deleteFeatureTemplate`,
        method: 'get',
        params: data,
    })
}
//修改专题图样式
export function updateFeatureTemplate(data) {
    return request({
        url: `getinfo/feature-template/updateFeatureTemplate`,
        method: 'post',
        data: data,
    })
}
//爆管分析
export function filterKeywordsByValve(data) {
    return request({
        url: `getinfo/asset-overview/filterKeywordsByValve`,
        method: 'post',
        data: data,
    })
}
//根据水表关键字查询用户信息
export function filterKeywordsByWater(data) {
    return request({
        url: `getinfo/user-meter-info/getImpactUser`,
        method: 'post',
        data: data,
    })
}
//根据水表关键字查询用户信息
export function savePlan(data) {
    return request({
        url: `getinfo/water-suspension-plan/savePlan`,
        method: 'post',
        data: data,
    })
}
//根据水表关键字查询用户信息
export function listPlan(data) {
    return request({
        url: `getinfo/water-suspension-plan/listPlan`,
        method: 'get',
        data: data,
    })
}
//根据水表关键字查询用户信息
export function getPlan(data) {
    return request({
        url: `getinfo/water-suspension-plan/getPlan`,
        method: 'post',
        data: data,
    })
}
//审核通过
export function approveFeedback(data) {
    return request({
        url: `getinfo/advice-feedback/approveFeedback`,
        method: 'get',
        params: data,
    })
}
//审核不通过
export function rejectFeedback(data) {
    return request({
        url: `getinfo/advice-feedback/rejectFeedback`,
        method: 'get',
        params: data,
    })
}
//审核查询
export function listPendingFeedback(data) {
    return request({
        url: `getinfo/advice-feedback/listPendingFeedback`,
        method: 'get',
        params: data,
    })
}
//获取分析方案
export function getProject(data) {
    return request({
        url: `getinfo/analysis-case/list`,
        method: 'post',
        data: data,
    })
}
//增加分析方案
export function saveProject(data) {
    return request({
        url: `getinfo/analysis-case/save`,
        method: 'post',
        data: data,
    })
}
//删除分析方案
export function deleteProject(data) {
    return request({
        url: `getinfo/analysis-case/del`,
        method: 'post',
        data: data,
    })
}
//删除分析方案
export function deletePlan(data) {
    return request({
        url: `getinfo/water-suspension-plan/delPlan`,
        method: 'post',
        data: data,
    })
}
//更新分析方案
export function updateProject(data) {
    return request({
        url: `getinfo/analysis-case/update`,
        method: 'post',
        data: data,
    })
}
//选择分析方案
export function selectProject(data) {
    return request({
        url: `/analysis-case/selectById`,
        method: 'get',
        data: data,
    })
}
//下载excel
export function downloadExcel(data) {
    return request({
        url: `getinfo/file/download`,
        method: 'get',
        params: data,
        responseType: 'blob'
    })
}
//用户水表挂接保存户号
export function addUserMeterInfo(data) {
    return request({
        url: `getinfo/user-meter-info/addUserMeterInfo`,
        method: 'post',
        data: data,
    })
}
//营收数据挂接
export function dockingData(data) {
    return request({
        url: `getinfo/user-meter-info/dockingData`,
        method: 'get',
        data: data,
    })
}
//高级统计添加指标
export function metricFields(data) {
    return request({
        url: `getinfo/RunningManage/statistical-metric-fields`,
        method: 'post',
        data: data,
    })
}
export function spatialQuery(data) {
    return request({
        url: `getinfo/RunningManage/spatialQuery`,
        method: 'post',
        data: data
    })
}